package com.hzhq.contract.demo;

import org.bson.types.ObjectId;

/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/18 1:16
 * @desc:
 */
public class ObjectIsValild {

    public static void main(String[] args) {
//        String blockIdString = "test";
//        String objectIdString = "6071d5ca1c95c65bd0215bd5";
//        String objectIdToString = new ObjectId().toString();
//        System.out.println(ObjectId.isValid(blockIdString));
//        System.out.println(ObjectId.isValid(objectIdString));
//        System.out.println(ObjectId.isValid(objectIdToString));
        System.out.println(new ObjectId().toString());
    }
}
